package com.yanqu.road.entity.activity.seacraft;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.union.UnionBaseInfo;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Description 海上争霸之南海丝路 联盟联盟信息
 * @Author cwq
 * @Data 2022/1/20 14:38
 */
@FieldTypeAnnotation(tableName = "t_c_activity_seacraft_southsea_union")
public class SeacraftSouthSeaCrossUnionData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id",select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "联盟id",select = true, update = true)
    private String unionId;
    @FieldTypeAnnotation(desc = "晋级到的轮次")
    private int round;
    @FieldTypeAnnotation(desc = "前一轮的排名")
    private int rank;
    @FieldTypeAnnotation(desc = "轮次结果 包括 海盗之乱晋级的信息 k=1")
    private Map<Integer,SeacraftSouthSeaResultInfo> resultMap = new ConcurrentHashMap<>();
    @FieldTypeAnnotation(desc = "捐献信息")
    private Map<Integer, Long> donationShipMap = new ConcurrentHashMap<>();
    @FieldTypeAnnotation(desc = "联盟成员, 初始化船只数据的时候锁定成员")
    private Set<Long> memberSet = new HashSet<>();
    @FieldTypeAnnotation(desc = "联盟成员 修复耐久信息")
    private Map<Long, SeacraftSouthSeaFixDurableInfo> fixDurableMap = new ConcurrentHashMap<>();
    @FieldTypeAnnotation(desc = "联盟信息")
    private UnionBaseInfo unionBaseInfo;

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public String getUnionId() {
        return unionId;
    }
    public void setUnionId(String unionId) {
        if (unionId == null){
            return;
        }
        if (this.unionId == null || !this.unionId.equals(unionId)) {
            this.unionId = unionId;
            setOp(DataStatus.Update);
        }
    }

    public int getRound() {
        return round;
    }
    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setOp(DataStatus.Update);
        }
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        if (this.rank != rank) {
            this.rank = rank;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, com.yanqu.road.entity.activity.seacraft.SeacraftSouthSeaResultInfo> getResultMap() {
        return resultMap;
    }
    public void setResultMap(java.util.Map<java.lang.Integer, com.yanqu.road.entity.activity.seacraft.SeacraftSouthSeaResultInfo> resultMap) {
        if (null == resultMap){
            return;
        }
        if (this.resultMap == null || !this.resultMap.equals(resultMap)) {
            this.resultMap = resultMap;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, java.lang.Long> getDonationShipMap() {
        return donationShipMap;
    }
    public void setDonationShipMap(java.util.Map<java.lang.Integer, java.lang.Long> donationShipMap) {
        if (null == donationShipMap){
            return;
        }
        if (this.donationShipMap == null || !this.donationShipMap.equals(donationShipMap)) {
            this.donationShipMap = donationShipMap;
            setOp(DataStatus.Update);
        }
    }

    public Map<Long, SeacraftSouthSeaFixDurableInfo> getFixDurableMap() {
        return fixDurableMap;
    }

    public void setFixDurableMap(Map<Long, SeacraftSouthSeaFixDurableInfo> fixDurableMap) {
        if (this.fixDurableMap == null || !this.fixDurableMap.equals(fixDurableMap)) {
            this.fixDurableMap = fixDurableMap;
            setOp(DataStatus.Update);
        }
    }

    public Set<Long> getMemberSet() {
        return memberSet;
    }
    public void setMemberSet(Set memberSet) {
        if (null == memberSet){
            return;
        }
        if (this.memberSet == null || !this.memberSet.equals(memberSet)) {
            this.memberSet = memberSet;
            setOp(DataStatus.Update);
        }
    }

    public UnionBaseInfo getUnionBaseInfo() {
        return unionBaseInfo;
    }
    public void setUnionBaseInfo(UnionBaseInfo unionBaseInfo) {
        if (null == unionBaseInfo){
            return;
        }
        if (this.unionBaseInfo == null || !this.unionBaseInfo.equals(unionBaseInfo)) {
            this.unionBaseInfo = unionBaseInfo;
            setOp(DataStatus.Update);
        }
    }
}
